﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;

namespace NinjaToolbox.SubComponentModule
{
    public sealed class UnionSerializeWriter
    {
        Queue<Union> mQueue;


        public UnionSerializeWriter(Queue<Union> queue)
        {
            mQueue = queue;
        }

        public void Write(float value)
        {
            mQueue.Enqueue(Union.From(value));
        }

        public void Write(int value)
        {
            mQueue.Enqueue(Union.From(value));
        }

        public void Write(string value)
        {
            mQueue.Enqueue(Union.From(value));
        }

        public void Write(bool value)
        {
            mQueue.Enqueue(Union.From(value));
        }
    }
}
